from django.urls import path
from users import views

urlpatterns = [
    # 登录
    path('login/', views.LoginView.as_view()),
    path('', views.UserView.as_view({
        'post': 'create',
        'get': 'list'
    })),
    path('<int:pk>/', views.UserDetailView.as_view({
        'get': 'retrieve',
        'put': 'update',
        'delete': 'destroy',
    })),
    # 重置用户密码
    path('reset/<int:pk>/', views.UserResetView.as_view()),
    # 导出用户
    path('export/', views.UserExportView.as_view()),
    # 导入用户
    path('upload/', views.UserUploadView.as_view()),
]
